<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动基本使用</title>
    <style>
        .div1 {
            width: 100px;
            height: 100px;
            background-color: pink;

            /* 浮动 */
            float: left;
        }

        .div2 {
            width: 200px;
            height: 200px;
            background-color: orange;

            /* 浮动 */
            float: right;
        }
    </style>
</head>
<body>
    <div class="div1">div1</div>
    <div class="div2">div2</div>
</body>
</html>